home *** CD-ROM | disk | FTP | other *** search
- Path: erich.triumf.ca!bennett
- From: bennett@erich.triumf.ca (P.Bennett)
- Newsgroups: comp.lang.c
- Subject: Re: CONVERTING INTEGER TO ASCII??????
- Date: 16 Mar 1996 09:55 PST
- Organization: TRIUMF: Tri-University Meson Facility
- Distribution: world
- Message-ID: <16MAR199609550235@erich.triumf.ca>
- References: <4i17r9$2kn@maltese.eag.unisysgsg.com> <4i1cvg$1cg@solutions.solon.com> <4ic5kp$d0g@athos.cc.bellcore.com>
- NNTP-Posting-Host: erich.triumf.ca
- News-Software: VAX/VMS VNEWS 1.50
-
- In article <4ic5kp$d0g@athos.cc.bellcore.com>, "Sandeep V. Tamhankar" <stamhank@notes.cc.bellcore.com> writes...
-
- >Another way to convert integer to ASCII is to add char '0' to your
- >integer. Like so:
- >
- > int asc;
- > asc= known_int + '0';
- >
- >This way, you don't have to load any function and there is no overhead.
-
- But this only works for 10 of the (at least) 65,536 possible integer values.
-
-
-
- Peter Bennett VE7CEI | Vessels shall be deemed to be in sight
- Internet: bennett@triumf.ca | of one another only when one can be
- Packet: ve7cei@ve7kit.#vanc.bc.ca | observed visually from the other
- TRIUMF, Vancouver, B.C., Canada | ColRegs 3(k)
- GPS and NMEA info and programs: ftp://sundae.triumf.ca/pub/peter/index.html
- or: ftp://ftp-i2.informatik.rwth-aachen.de/pub/arnd/GPS/peter/index.html
-
-